<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="oastaglib" prefix="oas"%>
<html>
<head>

    <title>Online Attendance System</title>
    <link rel="stylesheet" type="text/css" href="<c:url value="/resources/bootstrap/dist/css/bootstrap.min.css" /> ">
    <script type="text/javascript" src="<c:url value="/resources/js/jquery/dist/jquery.min.js"/>"></script>
    <script type="text/javascript" src="<c:url value="/resources/bootstrap/dist/js/bootstrap.min.js"/>"></script>
</head>
<body style="background-color:#eeeeee">
<oas:nav></oas:nav>
<oas:content>
<div style="background-color:#ffffff;width:90%;margin:0 auto;padding:15px 10px;">
    管理员登陆后主页
    <br/>

    <h1>${parentWorkcell.name }的子部门列表</h1><br/>
    <c:if test="${paginationSupport.totalCount == 0 }">
        <h2><c:out value="该部门没有子部门"/></h2>
    </c:if>

    <c:forEach items="${paginationSupport.items }" var="workcell">
        部门ID:${workcell.id}<br/>
        部门名称:${workcell.name}<br/>
        <a href="<c:url value="/workcells/childrenWorkcells?workcellId=${workcell.id}"/>">查看子部门</a>
        <hr/>
    </c:forEach>

    <c:if test="${empty paginationSupport || paginationSupport.totalCount != 0 }">
        <br/>
        每页${paginationSupport.pageSize}条记录， 第${paginationSupport.currentPageNo}/${paginationSupport.totalPageCount}页， 共${paginationSupport.totalCount}条记录
        <c:if test="${paginationSupport.previousPage }">
            <a href="<c:url value="/workcells/childrenWorkcells?workcellId=${parentWorkcell.id }&&pageNo=${paginationSupport.currentPageNo-1}"/>">上一页</a>
        </c:if>

        <c:if test="${paginationSupport.nextPage }">
            <a href="<c:url value="/workcells/childrenWorkcells?workcellId=${parentWorkcell.id }&&pageNo=${paginationSupport.currentPageNo+1}"/>">下一页</a>
        </c:if>
    </c:if>

    <br/><br/>
    <a href="<c:url value="/workcells/add" />">增加子部门</a><br/>
    <a href="<c:url value="/workcells/delete"/>">删除子部门</a><br/>
    <a href="<c:url value="/workcells/update"/>">修改子部门信息</a><br/>
    <a href="<c:url value="${parentUrl}"/>">返回</a>
 </div>
</oas:content>
<oas:footer></oas:footer>
</body>
</html>
